// blufi_mode.dart
enum BlufiMode {
  sta(1),
  ap(2);

  const BlufiMode(this.value);
  final int value;

  static BlufiMode fromValue(int value) {
    return BlufiMode.values.firstWhere(
          (e) => e.value == value,
      orElse: () => BlufiMode.sta, // 默认值
    );
  }
}